-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MySQL 9: Add support for VECTOR type #15431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b30def4
to
dcea6ee
Compare
I am not sure if this should go into PHP 8.2 or not. |
Fixing the heap corruption should target PHP-8.2 (unless it would be too disruptive a change). Proper support for new MySQL datatypes should probably target |
I don't know what's causing the heap corruption or how to fix it. This PR only adds support for the new data type hence why I targeted master. A test would be nice, but I think it can only be tested with a MySQL 9 server and our test suite doesn't offer that yet. |
Me neither (might have something to do with mysql_nd's arena allocation).
Even if the test would be skipped in CI, it would nonetheless be useful for local developement, and (for me) to see what's going on (i.e. if a string is returned, what the format would look like). |
Thanks for adding the test. So MySQL sends the data as 4-byte binary floats in little-endian format accross the wire (not in network byte order)? If so, users would need to |
I don't actually know what users would do with this in PHP. I assume they wouldn't usually do this and instead use |
It was just because @richloh wrote:
So giving back an array of doubles (aka. "full support") would be nice for best compatibility with libmysql-client, but I'm fine with having only "basic support", i.e. passing back a binary string, but it might be a good idea to document this in UPGRADING (and to mention |
I don't think they would. Correct me if I'm wrong but I thought libmysql would work the exact same way. And in terms of the MySQL client, it returns a hexadecimal formatted string by default. I think this is the full support. The bug report started in phpMyAdmin, which I believe is the reason for the expectation. PMA can implement such helper functionality once PHP supports this data type. But PHP should stick as close as possible to what libmysql does. |
80ece39
to
27c4ca2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I think this is good as is.
Note that the CI failures are unrelated to this PR, and could be resolve by rebasing again; not sure if that's important, though.
Missing PDO support here |
Can you expand on that? What is missing in PDO? |
This still doesn't fix the heap crash that happens without this change.
Fixes #15432